package demo;

import com.lijinjiang.beautyeye.BeautyEyeLNFHelper;

import javax.swing.*;
import java.awt.*;

/**
 * @ClassName JButtonDemo
 * @Description TODO
 * @Author Li
 * @Date 2022/9/15 15:30
 * @ModifyDate 2022/9/15 15:30
 * @Version 1.0
 */
public class JButtonDemo {
    public static void main(String[] args) {
        try {
            //UIManager.put("DefaultFont",new Font("黑体", Font.PLAIN, 10));
            UIManager.put("Screen.Resolution","");
            BeautyEyeLNFHelper.frameBorderStyle = BeautyEyeLNFHelper.FrameBorderStyle.generalNoTranslucencyShadow;
            //BeautyEyeLNFHelper.frameBorderStyle = BeautyEyeLNFHelper.FrameBorderStyle.osLookAndFeelDecorated;
            BeautyEyeLNFHelper.launchBeautyEyeLNF();
        } catch (Exception e) {
            e.printStackTrace();
        }
        JFrame frame = new JFrame("Demo01");
        frame.setSize(400, 500);

        JPanel panel = new JPanel();// 中间组件

        JButton btn01 = new JButton("普通按钮");
        JButton btn02 = new JButton("带颜色按钮");
        JButton btn03 = new JButton("不可编辑按钮");


        // 1.普通按钮
        panel.add(btn01);

        // 2.带颜色的按钮
        btn02.setOpaque(true);
        btn02.setBackground(Color.BLUE);
        panel.add(btn02);

        // 3.不可编辑按钮
        btn03.setEnabled(false);
        panel.add(btn03);

        frame.getContentPane().add(panel);
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.setLocationRelativeTo(null);
        frame.setVisible(true);
    }
}
